<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>选择题库左侧菜单</title>

    <style>

        #header {
            background-color:black;
            color:white;
            text-align:center;
            padding:5px;
        }
        #nav {
            background-color:#eeeeee;
            float:left;
            width:18%;
            padding:5px;
            height: 90%;
        }
        #section {
            float:right;
            border: 0px solid red;
            width:80%;
            height: 90%;
        }
        #footer{
            padding: 0px;
            text-align: center;
            clear: both;
        }
    　
    </style>
    <link href="${ctx}/common/jquery/jquery_menu_left/css/style.css" rel="stylesheet" type="text/css">

</head>
<body>

<div id="header">
    <h1>在线考试系统</h1>
    <div>
        欢迎同学：${pageContext.request.session.getAttribute("userInfo").name}使用现在考试系统&nbsp;&nbsp;<a href="javascript:logOut({project_name:'${ctx}'});">注销</a>
    </div>
</div>

<div id="nav">
    <%--jquery 菜单插件start--%>
    <div class="lvc-wrap" id="lvc-nav">
        <ul class="lvc-nav">
            <li class="nav-pic1 next-layer" title="课堂管理">
                <a>课堂管理</a>
                <ol>
                    <li><a href="http://www.taobao.com">历史课堂统计</a></li>
                    <li>课堂实时统计</li>
                </ol>
            </li>
            <li class="nav-pic2" title="科目管理"><a href="http://www.baidu.com">科目管理</a></li>
            <li class="nav-pic3" title="教室管理"><a>教室管理</a></li>
            <li class="nav-pic4" title="课堂点播"><a>课堂点播</a></li>
            <li class="nav-pic5" title="课堂直播"><a>课堂直播</a></li>
            <li class="nav-pic6" title="用户管理"><a>用户管理</a></li>
            <li class="nav-pic7 next-layer" title="报表统计">
                <a>报表统计</a>
                <ol>
                    <li><a href="http://www.taobao.com">历史课堂统计</a></li>
                    <li>课堂实时统计</li>
                </ol>
            </li>
            <li class="nav-pic8" title="日志管理"><a>日志管理</a></li>
            <li class="nav-pic9" title="系统管理"><a>系统管理</a></li>
            <li class="nav-pic10" title="订单管理"><a>订单管理</a></li>
            <li class="nav-pic11" title="我的课堂"><a>我的课堂</a></li>
            <li class="nav-pic12" title="个人中心"><a>个人中心</a></li>
        </ul>
        <button type="button" class="btn-nav"></button>
    </div>
        <%--jquery 菜单插件end--%>
</div>

<div id="section">
    <input type="text" name="" id="examePaperId" value="${pageContext.request.getParameter("examePaperId")}"/>
    <input type="text" name="" id="examePaperScoreId" value="${pageContext.request.getParameter("examePaperScoreId")}"/>
    <%--页面内容--%>
    <%--<%@ include file="../student/jquery_time_last/index.jsp"%>--%>
    <%--<jsp:include page="../student/jquery_time_last/index.jsp"></jsp:include>--%>
        <%--<iframe id="mainFrame" class="mainFrame" src="${ctx}/examination/student/jquery_time_last/index.jsp"></iframe>--%>
        <iframe id="mainframe" name="mainframe" src="${ctx}/examination/student/jquery_time_last/index.jsp"  width="100%" height="100%" scrolling="no"  frameBorder="0" > </iframe>
</div>

<div id="footer">
        <p>服务热线：400-820-8590 Copyright @ 2020-2030 极客工作室 昆ICP备05031718号</p>
</div>

<script src="${ctx}/common/jquery/jquery-3.5.0.js"></script>
<script src="${ctx}/examination/common_module/js/sys_user.js"></script>
<script type="text/javascript">
    //父类的参数对象类
    function parentArgObj(){
        var argObj = {};
        argObj.examePaperId = $("#examePaperId").val();
        argObj.examePaperScoreId = $("#examePaperScoreId").val();
        return argObj;
    }
    $(document).ready(function(){

        //展开收起
        $(".btn-nav").click(function () {
            $(".lvc-wrap").toggleClass("lvc-close")
            $("ol").toggleClass("small-ol")
            $(".next-layer ol").hide()

            if($("#lvc-nav").hasClass('lvc-close')){
                $(".next-layer ").removeClass("arrow")
            }
        })

        //选中状态
        $(".lvc-nav li").click(function () {
            $(this).siblings().find('ol').hide()
            $(this).addClass("active").siblings().removeClass("active")
        })
        /**
         * 事件控制方法
         */
        $(".lvc-nav li a").click(function (e) {
            if (e && e.preventDefault){
                e.preventDefault();
            }else{
                window.event.returnValue = false; //兼容IE
            }
            var href = $(this).attr("href");
            $("#mainframe").attr("src",href);
            // alert(frameSrc);
            // window.location.href = href;
            // alert(href)
        })
        //选中子集清除父级active
        $("ol>li").click(function (e) {
            console.log('ol>li clicked')
            e.stopPropagation()
            $(this).parent().parent().removeClass("active")
        })

        //二级导航展开收起
        $(".next-layer").click(function () {
            $(this).children("ol").toggle();
            $(this).toggleClass("arrow").siblings().removeClass("arrow")
        })


        $("ol li").click(function () {
            if($("ol").hasClass('small-ol')) {
                $(".small-ol").hide();
                $(this).parent().parent().addClass("active")
            }
        })
    })
</script>
</body>
</html>
